:root {
  --bg: #0f172a;
  --bg-alt: #111827;
  --surface: rgba(15, 23, 42, 0.75);
  --surface-light: #f8fafc;
  --surface-muted: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #22d3ee;
  --text: #0f172a;
  --text-light: #f1f5f9;
  --muted: #64748b;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.12);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #f1f5f9;
  line-height: 1.6;
}

img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  display: block;
}

header.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  padding: 80px clamp(24px, 6vw, 120px);
  background: radial-gradient(circle at top left, #1d4ed8, #0f172a 50%, #0b1120 100%);
  color: var(--text-light);
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.45), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.4), transparent 42%);
  pointer-events: none;
}

.hero__content,
.hero__figure {
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.2);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.1;
}

.hero__subtitle {
  color: rgba(241, 245, 249, 0.85);
  max-width: 540px;
}

.hero__cta {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__figure {
  background: rgba(15, 23, 42, 0.4);
  padding: 20px;
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero__figure figcaption {
  margin-top: 12px;
  font-size: 0.95rem;
  color: rgba(241, 245, 249, 0.8);
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.35);
}

.btn--ghost {
  background: rgba(15, 23, 42, 0.2);
  color: var(--text-light);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.btn:hover {
  transform: translateY(-2px);
}

.floating-nav {
  position: sticky;
  top: 16px;
  margin: -30px auto 40px;
  width: min(92%, 1080px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  z-index: 5;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.floating-nav button {
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.floating-nav button.is-active {
  background: var(--primary);
  color: white;
}

.floating-nav button:hover,
.floating-nav button:focus {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.floating-nav--compact {
  transform: scale(0.96);
  opacity: 0.85;
}

main {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding: 0 clamp(24px, 6vw, 120px) 80px;
}

.section {
  background: white;
  padding: clamp(32px, 4vw, 56px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.section--grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.section--accent {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(14, 165, 233, 0.08));
  box-shadow: none;
}

.section h2 {
  margin-top: 0;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cards {
  display: grid;
  gap: 20px;
}

.cards--2 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cards--3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.card h3 {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.info-card {
  background: rgba(15, 23, 42, 0.05);
  border-radius: var(--radius);
  padding: 24px 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.timeline__item {
  flex: 1 1 150px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.timeline__item--active,
.timeline__item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.timeline__details {
  background: white;
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.tab-group {
  display: inline-flex;
  padding: 6px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  gap: 6px;
  margin-bottom: 24px;
}

.tab {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab--active {
  background: white;
  color: var(--primary-dark);
  box-shadow: var(--shadow-soft);
}

.tab-panel {
  display: none;
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.tab-panel--active {
  display: block;
}

.switcher {
  display: inline-flex;
  gap: 8px;
  background: rgba(37, 99, 235, 0.08);
  padding: 6px;
  border-radius: 999px;
}

.switcher__btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  color: var(--primary-dark);
}

.switcher__btn--active {
  background: white;
  box-shadow: var(--shadow-soft);
}

.panel {
  display: none;
  margin-top: 24px;
  gap: 16px;
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.panel--active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: center;
}

.pill-group {
  display: inline-flex;
  gap: 8px;
  background: rgba(148, 163, 184, 0.25);
  padding: 8px;
  border-radius: 999px;
}

.pill {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}

.pill--active {
  background: white;
  color: var(--primary-dark);
  box-shadow: var(--shadow-soft);
}

.os-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.os-table th,
.os-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  text-align: left;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.accordion__item {
  border-radius: var(--radius);
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.accordion__trigger {
  width: 100%;
  padding: 18px 22px;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.accordion__trigger::after {
  content: "▾";
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.accordion__item--open .accordion__trigger::after {
  transform: rotate(180deg);
}

.accordion__content {
  max-height: 0;
  overflow: hidden;
  padding: 0 22px;
  transition: max-height 0.25s ease;
}

.accordion__item--open .accordion__content {
  padding: 0 22px 18px;
}

.mode-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.mode-toggle__btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
}

.mode-toggle__btn--active {
  background: white;
  box-shadow: var(--shadow-soft);
  color: var(--primary-dark);
}

.mode-list {
  margin: 20px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.slider-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.4);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}

.compare {
  display: grid;
  gap: 20px;
}

.compare__item {
  background: white;
  border-radius: var(--radius-sm);
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-soft);
}

.definition-list {
  display: grid;
  gap: 16px;
}

.definition-list dt {
  font-weight: 700;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.tool-grid li {
  background: white;
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.2);
  cursor: help;
}

.tool-grid li::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  width: max-content;
  max-width: 240px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tool-grid li:hover::after {
  opacity: 1;
}

.note {
  font-size: 0.95rem;
  color: var(--muted);
}

.clash-guide {
  margin-top: 28px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(14, 165, 233, 0.12));
  border-radius: var(--radius);
  padding: 24px 28px;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.build-guide ul {
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.ai-lab {
  margin-top: 24px;
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.stage-output {
  margin-top: 16px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.footer {
  text-align: center;
  padding: 48px clamp(24px, 6vw, 120px) 56px;
  color: var(--muted);
}

.footer .btn {
  margin-top: 16px;
}

@media (max-width: 768px) {
  header.hero {
    padding: 64px 24px;
  }

  .floating-nav {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 6px;
  }

  main {
    padding: 0 20px 60px;
    gap: 48px;
  }

  .section {
    padding: 28px 20px;
  }

  .timeline__item {
    flex: 1 1 100%;
  }

  .tab-group,
  .switcher,
  .mode-toggle,
  .pill-group {
    flex-wrap: wrap;
  }

  .panel--active {
    grid-template-columns: 1fr;
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
